import React from 'react';
import Index from './pages2/index'
import './index.css'
import Hot from './pages2/hot'
import Lesson  from './pages2/lseeon';


import { BrowserRouter as Router, Route, Link,Routes } from 'react-router-dom'

function AppRouter2() {
    return (
        <Router>
            <div className="mainDiv">
                <div className="leftDiv">
                    <h3>一级导航</h3>
                    <ul>
                        <li>
                            <Link to='/'>首页</Link>
                        </li>
                        <li><Link to='/hot'>沸点</Link></li>
                        <li><Link to='/lesson'>课程</Link></li>
                    </ul>
                </div>

                <div className="rightMain">
                    <Routes>
                    <Route path='/' element={<Index/>}></Route>
                    <Route path='/hot' element={<Hot/>}></Route>
                    <Route path='/lesson/*' element={<Lesson/>}></Route>
                    </Routes>
                </div>
            </div>
        </Router>
    )
}

export default AppRouter2